<template>
	<navigator class="goods-item" :url="`/pages/detail/index?id=${good.id}`">
		<u--image :showLoading="true" :src="good.cover_url" width="100%" height="200px"></u--image>
		<view class="title u-line-1">{{good.title}}</view>
		<view class="flex justify-between">
			<view class="price">￥{{good.price}}</view>
			<view class="sales">销量：{{good.sales}}</view>
		</view>
	</navigator>
</template>

<script>
	export default {
		name:"good-card",
		props: {
			good: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
	.goods-item {
		margin-top: 20rpx;
		padding: 32rpx;
		box-shadow: 0 12rpx 20rpx 0 rgba($color: #000000, $alpha: .1);
		.title {
			margin: 10rpx;
			font-weight: bold;
		}
		.price {
			margin: 0 10rpx;
			color: red;
		}
		.sales {
			margin: 0 10rpx;
			color: #888;
			font-size: 24rpx;
		}
	}
</style>
